//index.js
//获取应用实例
var api = require('../../utils/api.js');


const app = getApp()

Page({
  data: {
    list: [],
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 1000,
    userInfo: {}
  },

  onLoad: function () {
    var that = this;
    api.loadArticles('pics', 1, 2, function (list, count) {
      that.setData({ list: list });
    });
  },

  go1: function (e) {
    wx: wx.navigateTo({
      url: '../articles/articles'
    });
  },
  go2: function (e) {
    wx: wx.navigateTo({
      url: '../videos/videos'
    });
  },
  go3: function (e) {
    wx: wx.navigateTo({
      url: '../diangu/diangu'
    });
  },
  go4: function (e) {
    wx: wx.navigateTo({
      url: '../people/people'
    });
  },
  go5: function (e) {
    wx: wx.navigateTo({
      url: '../zan/zan'
    });
  },
  go6: function (e) {
    wx: wx.navigateTo({
      url: '../feedback/feedback'
    });
  }

})
